# _*_ utf-8 _*_
__author__ = "LiuJian"
__date__ = "2021/7/14 0014 17:13"
# @FileName :自定义异常类.Set.py

class AgeError(Exception):

    def __init__(self, age):

        self.age = age

    def __str__(self):

        return '您输入的年龄是:%d，有误，请重新输入！！！' % self.age

class Person(object):

    def __init__(self, age):

        if age > 0 and age <= 100:

            self.uage = age

            print('您输入的年龄是:%d，符合要求' % self.uage)

        else:
            raise AgeError(age)

per = Person(1000)


if __name__ == "__main__":
    TheApp = 0
